﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;

using WpfApp1.Command;

namespace WpfApp1.Model
{
    class User//: INotifyPropertyChanged //INotifyPropertyChanging
    {
        #region Version1
        //public event PropertyChangedEventHandler? PropertyChanged;

        //private string? _account;
        //public string Account
        //{
        //    get { return _account; }

        //    set
        //    {
        //        _account = value;
        //        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Account"));

        //    }
        //}
        //private string? _password;
        //public string Pwd
        //{
        //    get { return _password; }

        //    set
        //    {
        //        _password = value;
        //        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Pwd"));

        //    }
        //}


        //public void Login()
        //{
        //    if (Account == "123" & Pwd == "123")
        //    {
        //        MessageBox.Show("OK");
        //    }
        //    else
        //    {
        //        Account = "";
        //        Pwd = "";
        //        MessageBox.Show("错误用户或密码");

        //    }
        //}


        //public ICommand Command { get { return new DoCommand(Login); } }
        #endregion

        public string? Account { get; set; }

        public string? Password { get; set; }

        public string?  Name { get; set; }




    }
}
